{template 'common/header'}
<style type="text/css">
table{border-collapse:collapse;}
table th,table td{padding:5px 15px;border-top:1px solid #ddd;}
</style>
<div class='container' style='padding:0 5px 10px;margin:0;width:100%'>
	
	{if $op =='display'}
		<div class="panel panel-success">
		  <div class="panel-heading">常用工具 > 发起项目列表</div>
		</div>
		<form id="form2" class="form-horizontal" method="post">
			<table class="">
				<thead class="navbar-inner">
					<tr>
						<th style="width:30px">全选</th>
						<th style="width:70px">头像</th>
						<th style="width:70px">昵称</th>
	          			<th style="width:80px">电话</th>
	          			<th style="width:110px">项目类别</th>
	          			<th style="width:110px">项目标题</th>
	          			<th style="width:80px">筹集目标</th>
	          			<th style="width:110px">时间</th>
						<th style="width:40px">编辑</th>
					</tr>
				</thead>
				<tbody>
					{loop $lists $item}
					<tr>
						<td><input type="checkbox" value="{$item['id']}" name="delete[]"></td>
						<td><img src="{$item['mem_photo']}" style="width:40px;border-radius:50%"></td>
						<td>{$item['mem_name']}</td>
						<td>{$item['utel']}</td>
						<td>{$item['class_name']}</td>
						<td>{$item['pro_name']}</td>						
						<td>{$item['pro_goal']}</td>
						<td>{php echo date('Y-m-d H:i', $item['add_time'])}</td>
						<td>
						<a onclick="if(confirm('此操作不可恢复，确认吗？')){location.href='{php echo $this->createWebUrl('proj', array('id' => $item['id'],'op'=>'del'))}'}" href="javascript:;" title="删除" class="btn btn-xs btn-danger"><span class="icon icon-close">删除</span></a>
						<a  href="{php echo $this->createWebUrl('proj', array('id' => $item['id'],'op'=>'post'))}" title="查看" class="btn btn-xs btn-primary"><span class="icon icon-close">查看</span></a>
						<?php if($item['verify']==false){?>
						<a  href="{php echo $this->createWebUrl('verify', array('id' => $item['id']))}" title="未审核" class="btn btn-xs btn-info"><span class="icon icon-close">未审核</span></a>
						<?php }else{?>	
						<a  title="未审核" class="btn btn-xs btn-info"><span class="icon icon-close">已审核</span></a>
						<?php}?>
						</td>			
					</tr>
					{/loop}
					<tr >
						<td><input type="checkbox"  onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});" name=''>
							<input class="btn btn-primary btn-xs" type="submit" value="删除" name="submit" >
						</td>
						<td></td><td></td><td></td><td>
					</tr>
				</tbody>
			</table>

			<input type="hidden" value="proj" name="do">
			<input type="hidden" value="del" name="op">
			<input type="hidden" name="token" value="{$_W['token']}" />
		</form>
		{$pager}
	{elseif $op == 'post'}
	<div class="panel panel-success">
	    <div class="panel-heading">常用工具 > 添加/修改项目</div>
	</div>
	<div class="main">
		<form action="" method="post" class="form-horizontal form">
			<div class="panel panel-default">	
				<div class="panel-body">
					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">项目类型</label>
						<div class="col-sm-8">
							<input type="text" name="class_name" class="form-control" value="{$item['class_name']}" />
							<span class="help-block"></span>
						</div>
					</div>
										
					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">项目名称</label>
						<div class="col-sm-8">
							<input type="text" name="pro_name" class="form-control" value="{$item['pro_name']}" />
							<span class="help-block"></span>
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">项目简介</label>
						<div class="col-sm-8">
							<input type="text" name="pro_short" class="form-control" value="{$item['pro_short']}" />
							<span class="help-block"></span>
						</div>
					</div>
										
					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">手机号</label>
						<div class="col-sm-8">
							<input type="text" name="utel" class="form-control" value="{$item['utel']}" />
							<span class="help-block"></span>
						</div>
					</div>
					
					<div class="form-group">
				        <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">目标筹集</label>
				        <div class="col-sm-offset-1 input-group col-sm-4" style="margin-left: 10%;">
				            <input type="text" class="form-control span7" name="pro_goal" value="{$item['pro_goal']}">
				            <div class="input-group-addon">元</div>
				        </div>
				    </div>
				    
					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">特色图片</label>
						<div class="col-sm-8">
							<img src="{$_W['attachurl']}{$item['pro_feature']}" style="max-width:600px">
						</div>
					</div>	
					  
					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">项目详情</label>
						<div class="col-sm-8">
							{php echo tpl_ueditor('pro_content', $item['pro_content']);}
							<span class="help-block"></span>
						</div>
					</div>					
				</div>
			</div>
		</form>
	</div>
{/if}		
</div>

{template 'common/footer'}
